package com.ljyhhh.SmartCity.activity.fragment.homePage

import android.content.Context
import android.content.Intent
import android.os.Bundle
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import androidx.fragment.app.Fragment
import com.ljyhhh.SmartCity.R
import com.ljyhhh.SmartCity.activity.server.MyServer
import com.ljyhhh.SmartCity.activity.updatePwd.UpdatePasswordActivity
import kotlinx.android.synthetic.main.activity_home_page.*

class HomePage:Fragment() {
    lateinit var Mycontext:Context
    override fun onCreateView(
        inflater: LayoutInflater,
        container: ViewGroup?,
        savedInstanceState: Bundle?
    ): View? {
        return inflater.inflate(R.layout.activity_home_page,container,false)
    }

    override fun onAttach(context: Context) {
        super.onAttach(context)
        this.Mycontext=context
    }


    override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
        super.onViewCreated(view, savedInstanceState)



        updatePasswordActivity.setOnClickListener{

            startActivity(Intent(Mycontext, UpdatePasswordActivity::class.java))
        }
        button_server.setOnClickListener {
            startActivity(Intent(Mycontext, MyServer::class.java))
        }
    }
}